<?php 
require_once 'sesi_login.php';
require_once 'konfigurasi.php';

fungsi('pengguna');

define('PAGE', 'Admin Jadwal Praktikum');
define('PAGE_ICO', 'icon-stats');
define('PAGE_URL', 'admin_jadwal_praktikum.php');

panggil_header();
koneksi_buka();

$nilai = "";

if(isset($_POST['nilai'])){
	$nilai = $_POST['nilai'];
	if($nilai == '0'){
		$nilai = "";
	}
}

if(isset($_GET['nilai'])){
	$nilai = $_GET['nilai'];
	if($nilai == '0'){
		$nilai = "";
	}
}


$array['1'] =  'senin'; 
		 $array['2'] =  'selasa'; 
		 $array['3'] =  'rabu'; 
		 $array['4'] =  'kamis'; 
		 $array['5'] =  'jumat'; 
		 $array['6'] =  'sabtu'; 
		 $array['7'] =  'minggu'; 

$text_q_uts = "select * from d_nilai_uts where nilai=$nilai";
if($dt_uts=mysql_fetch_array(mysql_query($text_q_uts))){
	$d_nilai_uts = $dt_uts['id'];
	$text_q_uts_1 = "select * from d_d_nilai_uts where d_nilai_uts=$d_nilai_uts and nama='uts_1'";
	if($dt_uts_1=mysql_fetch_array(mysql_query($text_q_uts_1))){
		$id = $dt_uts_1['id'];
		$uts = $dt_uts_1['total'];
		
	}
	
	$text_q_uts_1 = "select * from d_d_nilai_uts where d_nilai_uts=$d_nilai_uts and nama='uts_1'";
	if($dt_uts_1=mysql_fetch_array(mysql_query($text_q_uts_1))){
		$id = $dt_uts_1['id'];
		$uts = $dt_uts_1['total'];
		
	}

}
//echo $text_q_jadwal;

//$q_jadwal = mysql_query($text_q_jadwal);

?>

<div class="content">
                
	<div class="page-header">
		<div class="icon">
			<span class="ico-arrow-right"></span>
		</div> 
		<h1> <a href="admin_input_nilai.php">Admin Input Nilai</a> &raquo; Input Nilai UTS<small>SDN I</small></h1>
	</div>
	
	<div class="row-fluid">
		<div class="span12">                

			<div class="block">
				<div class="head">                                
					<h2>UTS 1</h2>
					<ul class="buttons">             
						<li><a href="#" onClick="source('form_pa'); return false;"><div class="icon"><span class="ico-info"></span></div></a></li>
					</ul>                                                                  
				</div>        
				<form id="validate" method="post" action="modul/admin_nilai/nilai_uts_1_proses.php">
                	<div class="data-fluid">
						<div class="row-form">
							<div class="span2">uts</div>
							<div class="span5">
								<input name="uts_1" class="spinner" placeholder=" uts 1" type="text" />
							</div>
						</div>       
						<div class="row-form">
							<div class="span2">remidi 1</div>
							<div class="span5">
								<input name="remidi_1" class="spinner" placeholder=" remidi 1" type="text" />
							</div>
						</div>                  
						<div class="row-form">
							<div class="span2">remidi 2</div>
							<div class="span5">
								<input name="remidi_2" class="spinner" placeholder=" remidi 2" type="text" />
							</div>
						</div>                  
						<div class="row-form">
							<div class="span2">remidi 3</div>
							<div class="span5">
								<input name="remidi_3" class="spinner" placeholder=" remidi 3" type="text" />
							</div>
						</div>                  
						
						<div class="row-form">
							<div class="span2"></div>
							<div class="span9">                       
								<input type="submit" class="btn btn-primary" value="Simpan"/> 		
								<input type="reset" class="btn btn-warning" value="Batal"/>       
								<input type="hidden" name="nilai" value="<?php echo $nilai;?>"/> 		
							</div>   
						</div>
					</div>
				</form>        
			</div>
		</div>  
	</div>

	<div class="row-fluid">
		<div class="span12">                

			<div class="block">
				<div class="head">                                
					<h2>UTS 2</h2>
					<ul class="buttons">             
						<li><a href="#" onClick="source('form_pa'); return false;"><div class="icon"><span class="ico-info"></span></div></a></li>
					</ul>                                                                  
				</div>        
				<form id="validate" method="post" action="modul/admin_nilai/nilai_uts_2_proses.php">
                	<div class="data-fluid">
						<div class="row-form">
							<div class="span2">uts</div>
							<div class="span5">
								<input name="uts_1" class="spinner" placeholder=" uts 1" type="text" />
							</div>
						</div>       
						<div class="row-form">
							<div class="span2">remidi 1</div>
							<div class="span5">
								<input name="remidi_1" class="spinner" placeholder=" remidi 1" type="text" />
							</div>
						</div>                  
						<div class="row-form">
							<div class="span2">remidi 2</div>
							<div class="span5">
								<input name="remidi_2" class="spinner" placeholder=" remidi 2" type="text" />
							</div>
						</div>                  
						<div class="row-form">
							<div class="span2">remidi 3</div>
							<div class="span5">
								<input name="remidi_3" class="spinner" placeholder=" remidi 3" type="text" />
							</div>
						</div>                  
						
						<div class="row-form">
							<div class="span2"></div>
							<div class="span9">                       
								<input type="submit" class="btn btn-primary" value="Simpan"/> 		
								<input type="reset" class="btn btn-warning" value="Batal"/>       
								<input type="hidden" name="nilai" value="<?php echo $nilai;?>"/>
							</div>   
						</div>
					</div>
				</form>        
			</div>
		</div>  
	</div>


</div>

<div class="dialog" id="source" style="display: none;" title="Source"></div>

<?php
panggil_footer();
?>
